//引入mongoose模块
let mongoose = require('mongoose');
//创建目标集合的模型对象
let teacherSchema = new mongoose.Schema({
    name: String,
    courseId: [{
        type: mongoose.SchemaTypes.ObiectId,
        ref: 'courseModel'
    }],
    salary: Number,
    tel: Number
});
//建立模型队形与数据库中数据集合的关联关系k
let courseModel = mongoose.model('courseModel', courseSchema, 'course');